package com.wanmait.bootdemo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

//@RestController //相当于@Controller+@ResponseBody
@Controller
public class HelloController {
    @RequestMapping("/hello")
    //@ResponseBody
    public ModelAndView hello(String name)
    {
        System.out.println("33333333333333333333333");
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","hello "+name);
        return modelAndView;
    }
}
